package com.ruoyi.experiment.service.impl;

import java.util.List;

import com.ruoyi.experiment.domain.SampleMailing;
import com.ruoyi.experiment.mapper.SampleMailingMapper;
import com.ruoyi.experiment.service.ISampleMailingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 样品邮寄Service业务层处理
 *
 * @author ruoyi
 * @date 2024-06-07
 */
@Service
public class SampleMailingServiceImpl implements ISampleMailingService
{
    @Autowired
    private SampleMailingMapper sampleMailingMapper;

    /**
     * 查询样品邮寄
     *
     * @param mailingId 样品邮寄主键
     * @return 样品邮寄
     */
    @Override
    public SampleMailing selectSampleMailingByMailingId(Long mailingId)
    {
        return sampleMailingMapper.selectSampleMailingByMailingId(mailingId);
    }

    /**
     * 查询样品邮寄列表
     *
     * @param sampleMailing 样品邮寄
     * @return 样品邮寄
     */
    @Override
    public List<SampleMailing> selectSampleMailingList(SampleMailing sampleMailing)
    {
        return sampleMailingMapper.selectSampleMailingList(sampleMailing);
    }

    /**
     * 新增样品邮寄
     *
     * @param sampleMailing 样品邮寄
     * @return 结果
     */
    @Override
    public int insertSampleMailing(SampleMailing sampleMailing)
    {
        return sampleMailingMapper.insertSampleMailing(sampleMailing);
    }

    /**
     * 修改样品邮寄
     *
     * @param sampleMailing 样品邮寄
     * @return 结果
     */
    @Override
    public int updateSampleMailing(SampleMailing sampleMailing)
    {
        return sampleMailingMapper.updateSampleMailing(sampleMailing);
    }

    /**
     * 批量删除样品邮寄
     *
     * @param mailingIds 需要删除的样品邮寄主键
     * @return 结果
     */
    @Override
    public int deleteSampleMailingByMailingIds(Long[] mailingIds)
    {
        return sampleMailingMapper.deleteSampleMailingByMailingIds(mailingIds);
    }

    /**
     * 删除样品邮寄信息
     *
     * @param mailingId 样品邮寄主键
     * @return 结果
     */
    @Override
    public int deleteSampleMailingByMailingId(Long mailingId)
    {
        return sampleMailingMapper.deleteSampleMailingByMailingId(mailingId);
    }
}

